<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FRS-main</title>
<!--#include virtual="users.inc.asp"-->
<style type="text/css">
	div:hover {
		background-color:#6FF;
	}
	div {
		min-height:225px;
		margin:5px;
	}
	label {
		font-weight:bold;
	}
	div img {
		float:right;
		width:300px;
		height:225px;
	}
</style>
</head>

<body>
<%
set conn=server.createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("App_Data\MainDB.mdb")
set rs=server.createobject("adodb.recordset")
c01=request.QueryString("c01")
c02=request.QueryString("c02")
c03=request.QueryString("c03")
c04=request.QueryString("c04")
c05=request.QueryString("c05")
c06=request.QueryString("c06")
c07=request.QueryString("c07")
c08=request.QueryString("c08")
query="1=1"
if c01<>"" then
	query=query & " and (material\(2^" & c01 & "))mod 2=1"
end if
if c02<>"" then
	query=query & " and (leaf\(2^" & c02 & "))mod 2=1"
end if
if c03<>"" then
	query=query & " and (leafarrangement\(2^" & c03 & "))mod 2=1"
end if
if c04<>"" then
	query=query & " and (leafmaterial\(2^" & c04 & "))mod 2=1"
end if
if c05<>"" then
	query=query & " and (leafedge\(2^" & c05 & "))mod 2=1"
end if
if c06<>"" then
	query=query & " and (leafshape\(2^" & c06 & "))mod 2=1"
end if
if c07<>"" then
	query=query & " and (flowercolor\(2^" & c07 & "))mod 2=1"
end if
if c08<>"" then
	query=query & " and (flowershape\(2^" & c08 & "))mod 2=1"
end if
rs.open "SELECT * FROM [Species] WHERE " & query,conn,1,3
if rs.eof then
	response.Write("查无植物！")
end if
while (not rs.eof)
%>
<div>
	<img src="<%=rs("filepath") %>" />
	<label>中文名：</label><%=rs("ChineseName") %><br />
	<label>学名：</label><span style="font-style:italic;"><%
		str=rs("ScientificName")
		pos=InStr(str," ")
		pos=pos+InStr(mid(str,pos+1,len(str))," ")
		if pos=0 or pos=instr(str," ") then
			pos=len(str)
		end if
		response.Write(left(str,pos-1))
	%></span><%=" " & mid(str,pos+1,len(str))%><br />
	<label>俗名：</label><%=rs("CommonName") %><br />
	<label>科普简介：</label><%
		popintro=rs("PopIntro")
		popintro=Replace(Replace(popintro, vbCrlf, "<br />"), chr(32)&chr(32), "<br />")
		response.Write(popintro)
	%><br />
	<a href="addpic.asp?id=<%=rs("SpeciesID") %>">添加图片</a><br />
	<a href="show.asp?id=<%=rs("SpeciesID") %>">详细信息</a><br />
	<a href="update.asp?id=<%=rs("SpeciesID") %>">修改信息</a>
</div>
<%
	rs.movenext
wend
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>
